﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;
using System.ServiceModel;
using System.ServiceModel.Web;
using System.Text;

namespace WCFServiceWebRole1
{
    // NOTE: You can use the "Rename" command on the "Refactor" menu to change the interface name "IService1" in both code and config file together.
    [ServiceContract]
    public interface IChatServer
    {
        [OperationContract]
        bool UpdateStatus(string user, string Status);

        [OperationContract]
        bool Post(string originIP, string user, string status, string message);

        [OperationContract]
        bool DM(string originIP, string user, string status, string message, string destination);

        [OperationContract]
        void ForwardFile(string user, string destination, string GUID);

        [OperationContract]
        FilePost RequestFile(string user, string GUID);

        [OperationContract]
        bool PostFile(string origin, string user, string status, byte[] file, string filename, string destination);
        //at this point, the password has already been hashed, alllowing a straight String.Compare()
        [OperationContract]
        bool Login(string IP, string port, string username, string password);

        [OperationContract]
        void Logout(string user);

        [OperationContract]
        List<DMPost> getDMStream(string user);

        [OperationContract]
        List<DMPost> getDMStreamSince(string user, DateTime time);

        [OperationContract]
        List<Post> getStream(string user);

        [OperationContract]
        List<Post> getUpdatedStream(string user, DateTime time);

        [OperationContract]
        List<Record> getActiveUsers();
    }
}
